﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Macds.Core.Validation;

namespace Macds.Test.Core.Validation.Mocks
{
    public class StringEmptyValidation : IValidation
    {
        private string data;

        public StringEmptyValidation(string data)
        {
            this.data = data;
        }

        #region IValidation Members

        public bool IsValid
        {
            get
            {
                return String.IsNullOrEmpty(this.data) ? false : true;
            }
        }

        public Exception Exception
        {
            get { throw new ArgumentException("The data is empty"); }
        }

        #endregion
    }
}
